
<%@ page import="ratemymacclass.Rating" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />

        <g:set var="entityName" value="${message(code: 'rating.label', default: 'Rating')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav" style="text-align:center; color:white">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="Home"/></a></span>
            <span class="menuButton"><g:link controller="course" action="show" id="${ratingInstance?.course?.id}">${ratingInstance?.course?.encodeAsHTML()}</g:link></span>
            <span class="menuButton"><g:link controller="rating" class="create" action="create">Rate this course</g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.title.label" default="Title" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ratingInstance, field: "title")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.workload.label" default="Workload" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ratingInstance, field: "workload")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.easiness.label" default="Easiness" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ratingInstance, field: "easiness")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.useful.label" default="Useful" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ratingInstance, field: "useful")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.learning.label" default="Learning" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ratingInstance, field: "learning")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.preceptor.label" default="Preceptor" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${ratingInstance?.preceptor}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.professor.label" default="Professor" /></td>
                            
                            <td valign="top" class="value"><g:link controller="professor" action="show" id="${ratingInstance?.professor?.id}">${ratingInstance?.professor?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.year.label" default="Year" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ratingInstance, field: "year")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.major.label" default="Major" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ratingInstance, field: "major")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.forMajor.label" default="For Major" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${ratingInstance?.forMajor}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.comment.label" default="Comment" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: ratingInstance, field: "comment")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="rating.recommend.label" default="Recommend" /></td>
                            
                            <td valign="top" class="value"><g:formatBoolean boolean="${ratingInstance?.recommend}" /></td>
                            
                        </tr>
                    
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${ratingInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
